﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace DemoGame1
{
    public abstract class Menu : Screen
    {
        public List<MyButton> myButtons;
        public int nbuttons = 0;

        virtual public void HandleKeyInput()
        {
        }

        virtual public void Update(GameTime gameTime)
        {

        }

        virtual public void Draw(SpriteBatch sb, GameTime gameTime)
        {
            for (int i = 0; i < myButtons.Count; i++)
            {
                myButtons[i].Draw(sb, gameTime);
            }
        }

        protected Texture2D[] CreateTexture(ContentManager content, string strTexturePrefix, int nTextures)
        {
            string[] strTexture = new string[nTextures];
            Texture2D[] textures = new Texture2D[nTextures];
            for (int i = 0; i < nTextures; i++)
            {
                strTexture[i] = strTexturePrefix + (i + 1).ToString("00");
                textures[i] = content.Load<Texture2D>(strTexture[i]);
            }
            return textures;
        }
    }
}
